package com.lyw.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther liyawei
 * @Date 2022/4/22 10:58
 */
//@Configuration
public class MySelfRule {

//    @Bean
    public IRule iRule() {
        return new RandomRule(); // 定义为随机策略
    }
}
